package com.qyhl.module_home.city.bestone;


import com.qyhl.webtv.commonlib.entity.home.BestoneItemTypeBean;
import com.qyhl.webtv.commonlib.entity.home.BestoneTypeBean;

import java.util.List;

public class BestonePresenter implements BestoneContract.BestonePresenter {
    private BestoneContract.BestoneView view;
    private BestoneContract.BestoneModel model;

    public BestonePresenter(BestoneContract.BestoneView view) {
        this.view = view;
        model = new BestoneModel(this);
    }

    @Override
    public void getData() {
        model.getData();
    }

    @Override
    public void getDataError(String msg) {
        view.getDataError(msg);
    }

    @Override
    public void getDataSuccess(List<BestoneTypeBean> data) {
        view.getDataSuccess(data);
    }

    @Override
    public void search(String text) {
        model.search(text);
    }

    @Override
    public void searchError(String msg) {
        view.searchError(msg);
    }

    @Override
    public void searchSuccess(List<BestoneItemTypeBean> data) {
        view.searchSuccess(data);
    }
}
